package com.luying.dao;

import com.luying.pojo.BaseDown;
import com.luying.pojo.PageQuery;
import com.luying.pojo.Role;
import com.luying.pojo.UserRole;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface RoleDao extends Mapper<Role> {

    int addUserRole(@Param("userRole") UserRole userRole);

    List<BaseDown> selectAllUser();

    List<BaseDown> selectAllRole();

    UserRole selectByUserId(@Param("userId") Integer userId);

    int updateUserRole(@Param("userRole")UserRole userRole);

    List<UserRole> selectPage(@Param("query")PageQuery pageQuery);
}
